package com.xiaowen.tool.exception;

/**
 * 为了减少，FinhubException(Integer code, Integer type, String msg) 在逻辑中太长代码，封装此异常，
 * 接受GlobalResponseCode的枚举
 *
 * @author yan.pb
 * @date 2020/10/19
 */
public class XwException extends RuntimeException {


    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    private Integer code;

    private Integer type;

    private String msg;

    private Object data;


    public XwException(int code, String msg) {
        super(msg);
        this.msg = msg;
        this.code = code;
    }

    public XwException(int code, String msg, int type) {
        super(msg);
        this.msg = msg;
        this.code = code;
        this.type = type;
    }
}
